package br.com.sgi.model;

import java.io.Serializable;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Version;

/**
 * Entidade padrão do sistema.
 * 
 * @author Diego Junio Costa Neves
 * 
 */
@MappedSuperclass
public abstract class Entidade implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -8123254504863906769L;

	@Id
	@GeneratedValue(strategy = GenerationType.TABLE)
	private Long id;
	
	@Version
	private Long versao;

	public Long getId() {
		return id;
	}

	public Long getVersao() {
		return versao;
	}

}
